home *** CD-ROM | disk | FTP | other *** search
/ Power CD / Power CD ATARI-Rechner Lieben.iso / SPEZIAL / GEMVIEW / VERSION.3 / MODULS.SRC / STRCTURE / MODULS.H < prev   
Encoding:
C/C++ Source or Header  |  1993-10-30  |  12.1 KB  |  318 lines

  1. /* spx_img.h:
  2.  *
  3.  * 22.10.1993 by Dieter Fiebelkorn
  4.  */
  5.  
  6. #define GVWL_module  'GVWL'
  7. #define GVWL_Version 0x0100
  8. #define GVWL_exten   ".GVL"
  9. #define GVWL_subdir  "GVWLOAD"
  10. #define GVWS_module  'GVWS'
  11. #define GVWS_Version 0x0100
  12. #define GVWS_exten   ".GVS"
  13. #define GVWS_subdir  "GVWSAVE"
  14. #define GVWP_module  'GVWP'
  15. #define GVWP_Version 0x0100
  16. #define GVWP_exten   ".GVP"
  17. #define GVWP_subdir  "GVWPRINT"
  18. #define GVWR_module  'GVWR'
  19. #define GVWR_Version 0x0100
  20. #define GVWR_exten   ".GVR"
  21. #define GVWR_subdir  "GVWMODUL"
  22. #define GVWC_module  'GVWC'
  23. #define GVWC_Version 0x0100
  24.  
  25. #define GVWspprt_no  0x0000
  26. #define GVWspprt_mon 0x0001
  27. #define GVWspprt_col 0x0002
  28. #define GVWspprt_tc  0x0004
  29. #define GVWspprt_all 0x0007
  30.  
  31. #define GVWflag_no   0x0000
  32. #define GVWflag_res  0x0001
  33. #define GVWflag_auto 0x0002
  34. #define GVWflag_fsel 0x0004
  35.  
  36. #define GVWx_gemdos  0x001CL
  37. #define GVWx_header  0x0090L
  38. #define GVWx_start   0x0006
  39. #define GVWx_id      0x000C
  40. #define GVWx_vers    0x0010
  41. #define GVWx_supp    0x0012
  42. #define GVWx_flag    0x0014
  43. #define GVWx_ext     0x001C
  44. #define GVWx_name    0x0020
  45. #define GVWx_inf1    0x0030
  46. #define GVWx_inf2    0x0048
  47. #define GVWx_inf3    0x0060
  48. #define GVWx_inf4    0x0078
  49.  
  50.  
  51.  
  52. typedef unsigned long ulong;
  53. typedef unsigned int  uint;
  54. typedef void          ZFILE;
  55.  
  56.  
  57.  
  58. typedef struct LOAD_Structure {
  59.   long     identify;       /* GVWL_module  == 'GVWL' */
  60.   int      version;        /* GVWL_Version == 0x0100 */
  61.   char    *in_filename;
  62.   int      screen_depth;
  63.   int      identify_only;
  64.   int      user_identified;
  65.   struct {
  66.     ZFILE *(*open)            (char *name, int attrib);
  67.     ulong  (*read)            (ZFILE *zf, void *buf, ulong len);
  68.     int    (*getchr)          (ZFILE *zf);
  69.     char  *(*gets)            (void *buf, ulong len, ZFILE *zf);
  70.     ulong  (*skip)            (ZFILE *zf, ulong len);
  71.     ulong  (*seek)            (ZFILE *zf, int seekmode, ulong offset);
  72.     ulong  (*tell)            (ZFILE *zf);
  73.     int    (*eof)             (ZFILE *zf);
  74.     void   (*close)           (ZFILE *zf);
  75.   } input;
  76.   struct {
  77.     int    (*printout)        (const char* format, ...);
  78.   } print;
  79.   struct {
  80.     void   (*printerr)        (const char* format, ...);
  81.     void   (*userexit)        (void);
  82.   } error;
  83.   struct {
  84.     byte  *(*malloc)          (ulong size);
  85.     void   (*free)            (void *area);
  86.   } memory;
  87.   struct {
  88.     Image *(*newBitImage)     (char *title, unsigned int width, unsigned int height);
  89.     Image *(*newRGBImage)     (char *title, unsigned int width, unsigned int height, unsigned int depth);
  90.     Image *(*newTCImage)      (char *title, unsigned int width, unsigned int height);
  91.     Image *(*newGEMImage)     (char *title, unsigned int width, unsigned int height, unsigned int depth);
  92.     void   (*freeGVImage)     (Image *image);
  93.     Image *(*rotate)          (Image *image, int rotate);
  94.   } images;
  95.   struct {
  96.     void   (*evntHandle)      (int wait);
  97.     void   (*evntHandleMouse) (int ev_mx, int ev_my, int keystate, int keypress, int gvwInAction, int* exit);
  98.     void   (*evntHandleKeybd) (int keystate, int keypress, int gvwInAction, int* exit);
  99.     void   (*evntHandleButton)(int ev_mx, int ev_my, int ev_mbutton, int ev_mbreturn, int keystate, int keypress, int gvwInAction, int* exit);
  100.     void   (*evntHandleMesag) (int* msg, int ev_mx, int ev_my, int keystate, int keypress, int gvwInAction, int* exit);
  101.     void   (*evntHandleTimer) (int ev_mx, int ev_my, int keystate, int keypress, int ev_mbutton, int gvwInAction, int* exit);
  102.     int    (*alert)           (int button, const char *astring);
  103.   } events;
  104.   struct {
  105.     void   (*reset_dialogCol) (int flag);
  106.     void   (*send_windOpen)   (int wind_id);
  107.     void   (*send_windClosed) (int wind_id);
  108.     void   (*send_windTop)    (int wind_id);
  109.     void   (*send_windBottom) (int wind_id);
  110.   } diawin;
  111.   struct {
  112.     int      applicationID;
  113.     int      gemview_vers;
  114.     int      tos_version;
  115.     int      aes_version;
  116.     int      multi_task;
  117.   } versions;
  118.   struct {
  119.     unsigned IMG_fastload      :  1;
  120.     unsigned IMG_vdicolororder :  1;
  121.     unsigned IMG_TCalign16     :  1;
  122.     unsigned PCD_loadBase      :  3;
  123.     unsigned DSP_usingit       :  1;
  124.     unsigned DSP_greyscale     :  1;
  125.     unsigned UNUSED            :  8;
  126.     unsigned FUTUREUSED        : 16;
  127.     long     RESERVED;
  128.   } flags;
  129. } LOAD_Structure;
  130.  
  131.  
  132.  
  133. typedef struct SAVE_Structure {
  134.   long     identify;       /* GVWS_module  == 'GVWS' */
  135.   int      version;        /* GVWS_Version == 0x0100 */
  136.   Image   *image;
  137.   int      screen_depth;
  138.   char    *out_filename;
  139.   struct {
  140.     int    (*open)            (char *file);
  141.     ulong  (*write)           (int handle, ulong count, void *buf);
  142.     int    (*close)           (int handle);
  143.     int    (*delete)          (const char *fname);
  144.   } output;
  145.   struct {
  146.     int    (*printout)        (const char* format, ...);
  147.   } print;
  148.   struct {
  149.     void   (*printerr)        (const char* format, ...);
  150.     void   (*userexit)        (void);
  151.   } error;
  152.   struct {
  153.     byte  *(*malloc)          (ulong size);
  154.     void   (*free)            (void *area);
  155.   } memory;
  156.   struct {
  157.     void   (*evntHandle)      (int wait);
  158.     void   (*evntHandleMouse) (int ev_mx, int ev_my, int keystate, int keypress, int gvwInAction, int* exit);
  159.     void   (*evntHandleKeybd) (int keystate, int keypress, int gvwInAction, int* exit);
  160.     void   (*evntHandleButton)(int ev_mx, int ev_my, int ev_mbutton, int ev_mbreturn, int keystate, int keypress, int gvwInAction, int* exit);
  161.     void   (*evntHandleMesag) (int* msg, int ev_mx, int ev_my, int keystate, int keypress, int gvwInAction, int* exit);
  162.     void   (*evntHandleTimer) (int ev_mx, int ev_my, int keystate, int keypress, int ev_mbutton, int gvwInAction, int* exit);
  163.     int    (*alert)           (int button, const char *astring);
  164.   } events;
  165.   struct {
  166.     void   (*reset_dialogCol) (int flag);
  167.     void   (*send_windOpen)   (int wind_id);
  168.     void   (*send_windClosed) (int wind_id);
  169.     void   (*send_windTop)    (int wind_id);
  170.     void   (*send_windBottom) (int wind_id);
  171.   } diawin;
  172.   struct {
  173.     int      applicationID;
  174.     int      gemview_vers;
  175.     int      tos_version;
  176.     int      aes_version;
  177.     int      multi_task;
  178.   } versions;
  179. } SAVE_Structure;
  180.  
  181.  
  182.  
  183. typedef struct PRINT_Structure {
  184.   long     identify;       /* GVWP_module  == 'GVWP' */
  185.   int      version;        /* GVWP_Version == 0x0100 */
  186.   Image   *image;
  187.   int      screen_depth;
  188.   struct {
  189.     int    (*open)            (char *file);
  190.     ulong  (*write)           (int handle, ulong count, void *buf);
  191.     int    (*status)          (int handle);
  192.     int    (*close)           (int handle);
  193.   } output;
  194.   struct {
  195.     int    (*printout)        (const char* format, ...);
  196.   } print;
  197.   struct {
  198.     void   (*printerr)        (const char* format, ...);
  199.     void   (*userexit)        (void);
  200.   } error;
  201.   struct {
  202.     byte  *(*malloc)          (ulong size);
  203.     void   (*free)            (void *area);
  204.   } memory;
  205.   struct {
  206.     void   (*evntHandle)      (int wait);
  207.     void   (*evntHandleMouse) (int ev_mx, int ev_my, int keystate, int keypress, int gvwInAction, int* exit);
  208.     void   (*evntHandleKeybd) (int keystate, int keypress, int gvwInAction, int* exit);
  209.     void   (*evntHandleButton)(int ev_mx, int ev_my, int ev_mbutton, int ev_mbreturn, int keystate, int keypress, int gvwInAction, int* exit);
  210.     void   (*evntHandleMesag) (int* msg, int ev_mx, int ev_my, int keystate, int keypress, int gvwInAction, int* exit);
  211.     void   (*evntHandleTimer) (int ev_mx, int ev_my, int keystate, int keypress, int ev_mbutton, int gvwInAction, int* exit);
  212.     int    (*alert)           (int button, const char *astring);
  213.   } events;
  214.   struct {
  215.     void   (*reset_dialogCol) (int flag);
  216.     void   (*send_windOpen)   (int wind_id);
  217.     void   (*send_windClosed) (int wind_id);
  218.     void   (*send_windTop)    (int wind_id);
  219.     void   (*send_windBottom) (int wind_id);
  220.   } diawin;
  221.   struct {
  222.     int      applicationID;
  223.     int      gemview_vers;
  224.     int      tos_version;
  225.     int      aes_version;
  226.     int      multi_task;
  227.   } versions;
  228. } PRINT_Structure;
  229.  
  230.  
  231.  
  232. typedef struct PROC_Structure {
  233.   long     identify;       /* GVWR_module  == 'GVWR' */
  234.   int      version;        /* GVWR_Version == 0x0100 */
  235.   Image   *image;
  236.   int      screen_depth;
  237.   struct {
  238.     int    (*printout)        (const char* format, ...);
  239.   } print;
  240.   struct {
  241.     void   (*printerr)        (const char* format, ...);
  242.     void   (*userexit)        (void);
  243.   } error;
  244.   struct {
  245.     byte  *(*malloc)          (ulong size);
  246.     void   (*free)            (void *area);
  247.   } memory;
  248.   struct {
  249.     Image *(*newBitImage)     (char *title, unsigned int width, unsigned int height);
  250.     Image *(*newRGBImage)     (char *title, unsigned int width, unsigned int height, unsigned int depth);
  251.     Image *(*newTCImage)      (char *title, unsigned int width, unsigned int height);
  252.     Image *(*newGEMImage)     (char *title, unsigned int width, unsigned int height, unsigned int depth);
  253.     void   (*freeGVImage)     (Image *image);
  254.   } images;
  255.   struct {
  256.     void   (*evntHandle)      (int wait);
  257.     void   (*evntHandleMouse) (int ev_mx, int ev_my, int keystate, int keypress, int gvwInAction, int* exit);
  258.     void   (*evntHandleKeybd) (int keystate, int keypress, int gvwInAction, int* exit);
  259.     void   (*evntHandleButton)(int ev_mx, int ev_my, int ev_mbutton, int ev_mbreturn, int keystate, int keypress, int gvwInAction, int* exit);
  260.     void   (*evntHandleMesag) (int* msg, int ev_mx, int ev_my, int keystate, int keypress, int gvwInAction, int* exit);
  261.     void   (*evntHandleTimer) (int ev_mx, int ev_my, int keystate, int keypress, int ev_mbutton, int gvwInAction, int* exit);
  262.     int    (*alert)           (int button, const char *astring);
  263.   } events;
  264.   struct {
  265.     void   (*reset_dialogCol) (int flag);
  266.     void   (*send_windOpen)   (int wind_id);
  267.     void   (*send_windClosed) (int wind_id);
  268.     void   (*send_windTop)    (int wind_id);
  269.     void   (*send_windBottom) (int wind_id);
  270.   } diawin;
  271.   struct {
  272.     int      applicationID;
  273.     int      gemview_vers;
  274.     int      tos_version;
  275.     int      aes_version;
  276.     int      multi_task;
  277.   } versions;
  278. } PROC_Structure;
  279.  
  280.  
  281.  
  282. typedef struct CONV_Structure {
  283.   long            identify;       /* GVWC_module  == 'GVWC' */
  284.   int             version;        /* GVWC_Version == 0x0100 */
  285.   int      screen_depth;
  286.   struct {
  287.     ImageOptions *(*newImageOptions) (void);
  288.     byte         *(*malloc)          (ulong size);
  289.     void          (*free)            (void *area);
  290.   } memory;
  291.   struct {
  292.     void          (*evntHandle)      (int wait);
  293.     void          (*evntHandleMouse) (int ev_mx, int ev_my, int keystate, int keypress, int gvwInAction, int* exit);
  294.     void          (*evntHandleKeybd) (int keystate, int keypress, int gvwInAction, int* exit);
  295.     void          (*evntHandleButton)(int ev_mx, int ev_my, int ev_mbutton, int ev_mbreturn, int keystate, int keypress, int gvwInAction, int* exit);
  296.     void          (*evntHandleMesag) (int* msg, int ev_mx, int ev_my, int keystate, int keypress, int gvwInAction, int* exit);
  297.     void          (*evntHandleTimer) (int ev_mx, int ev_my, int keystate, int keypress, int ev_mbutton, int gvwInAction, int* exit);
  298.     int           (*alert)           (int button, const char *astring);
  299.   } events;
  300.   struct {
  301.     void          (*reset_dialogCol) (int flag);
  302.     void          (*send_windOpen)   (int wind_id);
  303.     void          (*send_windClosed) (int wind_id);
  304.     void          (*send_windTop)    (int wind_id);
  305.     void          (*send_windBottom) (int wind_id);
  306.     int           (*getMSaving)      (char *title, char *extention, char *name, char *filename);
  307.     int           (*getCSaving)      (char *title, char *extention, char *name, char *filename);
  308.     int           (*getTSaving)      (char *title, char *extention, char *name, char *filename);
  309.   } diawin;
  310.   struct {
  311.     int             applicationID;
  312.     int             gemview_vers;
  313.     int             tos_version;
  314.     int             aes_version;
  315.     int             multi_task;
  316.   } versions;
  317. } CONV_Structure;
  318.